{% extends "crm/base.html" %}

{% load i18n %}
{% load tagging_tags %}

{% block body %}
<h1>{{ object }}</h1>

<p><a href="{% url crm_organisation_edit org_id=object.id %}"><img src="{{ MEDIA_URL }}icons/edit.png" alt="Edit" title="Edit this organisaton record"/></a></p>

<table width="100%">
  <tr>
    <th>Name</th>
    <td>
     {{ object.name }}
    </td>
  </tr>
  <tr>
    <th>Parent organisation</th>
    <td>
      {% if object.parent %}
        <a href="{% url crm_organisation_detail object_id=object.parent.id %}">{{ object.parent }}</a>
      {% endif %}
    </td>
  </tr>
  <tr>
    <th>URL</th>
    <td>
      {% if object.url %}
        <a href="{{object.ur}}">{{ object.url }}</a>
      {% endif %}
    </td>
  </tr>
  <tr>
    <th>Tags</th>
    <td>
      {% tags_for_object object as tags %} 
      {% for tag in tags %}
        <a href="{% url crm_tagged_organisation tag_name=tag.name %}">{{ tag.name }}</a>
      {% endfor %}
    </td>
  </tr>
</table>
{% endblock %}
